package com.coolw.test.callback;

/**
 * 支付调用方
 *
 * @author coolw
 * @date 2025/1/17 9:17
 */
public class PayCaller {

    private Callback callback;

    /**
     * 注册回调服务
     */
    public void registerCallback(Callback callback) {
        this.callback = callback;
    }

    public void pay() {
        System.out.println("支付处理");
        if (callback != null) {
            callback.call("支付成功");
        }
    }
}
